package Demo;

public class Demo03 {
    public static void main(String[] args) {
        //输出100以内的偶数

        for(int b = 1; b <= 100; b++){
            if(b % 2 == 0){
                System.out.println(b);
            }
        }

        System.out.println("--------------------");
        for(int a = 2; a <= 100; a+=2){
            System.out.println(a);
        }

        //求1~100的和
        int c = 0;
        for(int i = 1; i <= 100; i++){
            c += i;
        }
        System.out.println(c);



    }
}
